<?php

class Layout
{
	private $_obj;
	private $_data = array();
	
	function Layout()
	{
		$this->_obj &= get_instance();
		
		$this->_data['theme'] 		= 'default';
		$this->_data['theme_zone'] 	= 'frontend';
	}
	
	function set($key, $data)
	{
		$this->data[$key] = $data;
	}
	
	function load($view, $return = FALSE)
	{
		if ( $return === TRUE )
		{
			return $this->_obj->load->view('loader', $this->_data, TRUE);
		}
		
		$this->_obj->load->vars($this->_data);
		$this->_obj->load->view('loader');
	}
}